Here are the current ways to diagnose a asadmin CLI subcommand: 1. set AS_DEBUG environment variable to "true". This turns on additional output from the command, showing how it is connecting to the remote server, the internal structure of the response, etc. 2. asadmin set-log-levels javax.enterprise.system.tools.admin=FINEST This turns on additional logging for many administrative commands. The output can be found in the server.log file. 3. use the Java debugger Depending on where the problem is, it may be necessary to either debug the asadmin command itself or the server that is running the command. To debug the asadmin command, it is necessary to edit the asadmin script so that an additional argument is passed to java: "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9909". The asadmin command can then be run and the debugger connected to it before it execute any code. To debug the server, use the --debug option to start-domain or start-local-instance and attach the debugger before running the command. |